<?php
require_once("../fm/utils/conn.php");
$method= trim($_GET['method']);
$nickname="";

if ($method=="checkFamily"){
 $family = trim($_POST['name']);
 $sql="select * from family where title='".$family."'";
}
if ($method=="checkEmail"){
 $email = trim($_POST['name']);
 $sql="select * from member where email='".$email."'";
}
if ($method=="checkNickname"){
 $nickname= trim($_POST['name']);
 $sql="select * from member where nickname='".$nickname."'";
}

$db = new mysql_db();
$result= $db->query($sql);
if($result>0){
   echo $db->jsonModule("user exit",$result);
}else{
   echo $db->jsonModule("success",$result);
}




?>